<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<html>
  <head>
   <base href="<%=basePath%>">
    <title>工资管理系统申诉异议信息列表</title>
    <link rel="styleSheet" href="css/body.css" type="text/css" media="all" />
    <script type="text/javascript">
	function pageHead(){
		document.forms.pageForm.action="ComplaintActionshowComplaints?pageNow=1";
		document.forms.pageForm.submit();
	}
    function pageTail(){
    	var pageNow = ${pageLast} ;
		document.forms.pageForm.action="ComplaintActionshowComplaints?pageNow="+pageNow;
		document.forms.pageForm.submit();
    }
    function pagePrev(){
    	if((${pageNow}-1)>0){
    		var pageNow=${pageNow}-1;
			document.forms.pageForm.action="ComplaintActionshowComplaints?pageNow="+pageNow;
			document.forms.pageForm.submit();
			}
    }
    function pageNext(){
    	if(${pageNow}+1<=${pageLast}){
    		var pageNow=${pageNow}+1;
			document.forms.pageForm.action="ComplaintActionshowComplaints?pageNow="+pageNow;
			document.forms.pageForm.submit();
			}
    }
</script>
  </head>
  
  <body>
  	<table>
  		<caption>工资管理系统申诉异议信息列表</caption>
  		<tr>
  			<th>信息列表序号</th>
  			<th>工号/帐号</th>
  			<th>标题</th>
  			<th>申诉日期</th>
  			<th>已读</th>
  			<th>详细内容</th>
  		</tr>
  		
  		<s:iterator value="complaintList" id="complaint" status="status">
  		<tr onmouseout="this.bgColor='white'" onmouseover="this.bgColor='#66CCFF'">
  				<td>${complaint.cid}</td>
	  			<td>${complaint.workid}</td>
	  			<td>${complaint.title}</td>
	  			<td>${complaint.objectiondate}</td>
	  			<td>${complaint.isread}</td>
	  			<td><a href="ComplaintActionshowComplaintDetail?cid=${complaint.cid}">详细</a></td>
	  	</tr>
	  	</s:iterator>
  	</table>
  	<form action="" id="pageForm" name="pageForm">
  	<div align="center"> <span>&nbsp;&nbsp;&nbsp;共<strong>${page}</strong> 条,
  		当前第 <strong>${pageNow}</strong> 页,共 <strong>${pageLast}</strong> 页 </span> 
  		<input type="button" value="首页" onclick="pageHead()"/>&nbsp;
  		<input type="button" value="上一页" onclick="pagePrev()"/>&nbsp;
  		<input type="button" value="下一页" onclick="pageNext()"/>&nbsp;
  		<input type="button" value="尾页" onclick="pageTail()"/>&nbsp;
    </div>
    </form>
  </body>
</html>